package com.yanqu.road.server.cmd.activity.jiuzhou.cross;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.jiuzhou.CrossJiuZhouProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.jiuzhou.JiuZhouMgr;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_JIU_ZHOU_GET_CHAMPION_DATA_FROM_CROSS, desc = "九州棋局获取本次活动冠军数据跨服返回")
public class JiuZhouGetChampionFromCross extends AbstractCommand {

    private CrossJiuZhouProto.CrossJiuZhouGetChampionDataResultMsg respMsg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        respMsg = CrossJiuZhouProto.CrossJiuZhouGetChampionDataResultMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        JiuZhouMgr.receiveChampionData(respMsg);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
